package com.sgcc.operate.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sgcc.operate.mapper.OCrowdAttrMapper;
import com.sgcc.operate.domain.OCrowdAttr;
import com.sgcc.operate.service.IOCrowdAttrService;

/**
 * 人群规则条件Service业务层处理
 * 
 * @author sgcc
 * @date 2021-03-23
 */
@Service
public class OCrowdAttrServiceImpl implements IOCrowdAttrService 
{
    @Autowired
    private OCrowdAttrMapper oCrowdAttrMapper;

    /**
     * 查询人群规则条件
     * 
     * @param id 人群规则条件ID
     * @return 人群规则条件
     */
    @Override
    public OCrowdAttr selectOCrowdAttrById(String id)
    {
        return oCrowdAttrMapper.selectOCrowdAttrById(id);
    }

    /**
     * 查询人群规则条件列表
     * 
     * @param oCrowdAttr 人群规则条件
     * @return 人群规则条件
     */
    @Override
    public List<OCrowdAttr> selectOCrowdAttrList(OCrowdAttr oCrowdAttr)
    {
        return oCrowdAttrMapper.selectOCrowdAttrList(oCrowdAttr);
    }

    /**
     * 新增人群规则条件
     * 
     * @param oCrowdAttr 人群规则条件
     * @return 结果
     */
    @Override
    public int insertOCrowdAttr(OCrowdAttr oCrowdAttr)
    {
        return oCrowdAttrMapper.insertOCrowdAttr(oCrowdAttr);
    }

    /**
     * 修改人群规则条件
     * 
     * @param oCrowdAttr 人群规则条件
     * @return 结果
     */
    @Override
    public int updateOCrowdAttr(OCrowdAttr oCrowdAttr)
    {
        return oCrowdAttrMapper.updateOCrowdAttr(oCrowdAttr);
    }

    /**
     * 批量删除人群规则条件
     * 
     * @param ids 需要删除的人群规则条件ID
     * @return 结果
     */
    @Override
    public int deleteOCrowdAttrByIds(String[] ids)
    {
        return oCrowdAttrMapper.deleteOCrowdAttrByIds(ids);
    }

    /**
     * 删除人群规则条件信息
     * 
     * @param id 人群规则条件ID
     * @return 结果
     */
    @Override
    public int deleteOCrowdAttrById(String id)
    {
        return oCrowdAttrMapper.deleteOCrowdAttrById(id);
    }
}
